#ifndef RECORD_CPP
#define RECORD_CPP

#include "Record.h"
Record::Record(){
}

Record::Record(string a, string b, string c, string d, string e, 
      string f, string g, string h, string i)
:symbol(a), price(b), atr(c), unitSize(d), stop(e), p2(f), p3(g), p4(h), p5(i)
{
}

ostream& operator<<(ostream& out, const Record& aRecord){
  out << aRecord.symbol << " " << aRecord.price << " " << aRecord.atr << " " <<
    aRecord.unitSize << " " << aRecord.stop << " " << aRecord.p2 << " " <<
    aRecord.p3 << " " << aRecord.p4 << " " << aRecord.p5;
  
  return out;
}

bool Record::operator<(const Record& r) const {
  if (symbol < r.symbol) return true;
  return false;
}

bool Record::operator==(const Record& r) const {
  if (symbol == r.symbol) return true;
  return false;
}

Record& Record::operator=(const Record& r){
  if (this != &r) {
    atr = r.atr;
    p2 = r.p2;
    p3 = r.p3;
    p4 = r.p4;
    p5 = r.p5;
    price = r.price;
    stop = r.stop;
    symbol = r.symbol;
    unitSize = r.unitSize;
  }
  return *this;
}

string Record::getRecord(){
  return symbol + " " + price + " " + atr + " " + unitSize + "  " + stop + 
  " " + price + " " + p2 + " " + p3 + " " + p4 + " " + p5;
}

string Record::getSymbol(){
  return symbol;
}
#endif
